<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/html">
<head>
    <title></title>
    #parse("sys/header.html")
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
            #if($shiro.hasPermission("dfsp:save"))
            <a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
            #end
            #if($shiro.hasPermission("dfsp:update"))
            <a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
            #end
            #if($shiro.hasPermission("dfsp:delete"))
            <a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
            #end
            #if($shiro.hasPermission("dfsp:list"))
            <a class="btn btn-primary" @click="queryfile"></i>&nbsp;查看附件</a>
            #end
            #if($shiro.hasPermission("dfsp:submit"))
            <a class="btn btn-primary" @click="submit"><i class="fa fa-pencil-square-o"></i>&nbsp;提交</a>
            #end
            #if($shiro.hasPermission("dfsp:processInt"))
            <a class="btn btn-primary" @click="processInt"><i class="fa fa-pencil-square-o"></i>&nbsp;审批</a>
            #end
            #if($shiro.hasPermission("dfsp:popHistory"))
            <a class="btn btn-primary" @click="popHistory"><i class="fa fa-pencil-square-o"></i>&nbsp;审批历史记录</a>
            #end
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <div v-show="!showList&&!showtable" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">
            <div class="form-group">
                <div class="col-sm-1 control-label">统计方式</div>
                <div class="col-sm-5">
                    <select v-model="dfsp.tjfs" class="form-control" readonly="readonly" id="tjfs">
                        <option v-for="tjfs in tjfs" :value="tjfs.value">{{tjfs.label}}</option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-1 control-label">垫付类型</div>
                <div class="col-sm-5">
                    <select v-model="dfsp.dfType" class="form-control" readonly="readonly" id="dfType">
                        <option v-for="dfType in dfType" :value="dfType.value">{{dfType.label}}</option>
                    </select>
                </div>
                <div id="jiesuandian">
                    <div>
                        <div class="col-sm-1 control-label"><span id="title">名称</span></div>
                        <div class="col-sm-5">
                            <input type="text" class="form-control" v-model="dfsp.jsdName" placeholder="请选择" readonly="readonly" @click="selectunit"/>
                        </div>
                    </div>

                    <div class="form-group" hidden="true">
                        <div class="col-sm-1 control-label">结算点id</div>
                        <div class="col-sm-5">
                            <input type="text" class="form-control" v-model="dfsp.jsdId" placeholder="结算点id"/>
                        </div>
                    </div>
                </div>
            </div>

            <div class="form-group">
                <div class="col-sm-1 control-label">垫付金额</div>
                <div class="col-sm-5">
                    <input type="text" class="form-control" v-model="dfsp.dfje" placeholder="垫付金额" id="dfje"/>
                </div>
                <div class="col-sm-1 control-label">垫付月数</div>
                <div class="col-sm-5">
                    <input type="text" class="form-control" v-model="dfsp.dfMonth" placeholder="垫付月数"/>
                </div>
            </div>

            <div class="form-group">
                <div id="changedate">
                    <div class="col-sm-1 control-label">开始日期</div>
                    <div class="col-sm-5">
                        <input type="text" class="form-control" v-model="dfsp.startDate" placeholder="开始日期" id="startDate"
                               readonly="readonly" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})"
                               onchange="startDate(this.value)"
                        />
                    </div>
                    <div class="col-sm-1 control-label">结束日期</div>
                    <div class="col-sm-5">
                        <input type="text" class="form-control" v-model="dfsp.endDate" placeholder="结束日期" id="endDate"
                               readonly="readonly"
                               onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" onchange="endDate(this.value)"
                        />
                    </div>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-1 control-label">支付日期</div>
                <div class="col-sm-5">
                    <input type="text" class="form-control" v-model="dfsp.zfDate" placeholder="支付日期" readonly="readonly"
                           onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" onchange="zfDate(this.value)"
                    />
                </div>
            </div>


            <div class="form-group" >
                <div class="col-sm-1 control-label">垫付事由</div>
                <div class="col-sm-5">
                    <textarea rows="3" cols="20" class="form-control" v-model="dfsp.dfsy" placeholder="垫付事由" style="resize: none;"/></textarea>
                </div>
                <div id="huikuan" hidden="true">
                    <div class="col-sm-1 control-label">回款承诺</div>
                    <div class="col-sm-5">
                        <textarea id="huikuanval" rows="3" cols="20" class="form-control" v-model="dfsp.hkcn" placeholder="回款承诺" style="resize: none;"/></textarea>
                    </div>
                </div>
            </div>

            <div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>
                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
            </div>
        </form>
    </div>

    <div v-show="showtable" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">
            <div class="form-group"  >
                <div class="col-sm-2 control-label">审批意见</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="dfsp.remark" placeholder="审批意见"/>
                </div>
            </div>

            <div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary" @click="process" value="批准"/>
                <input type="button" class="btn btn-primary" @click="reject" value="拒绝"/>
                <input type="button" class="btn btn-primary" @click="reload" value="返回"/>
            </div>
        </form>
    </div>
</div>

<!----------------------------选择结算单位窗口开始------------------------------------->
<div id="windowsetlement" hidden="true">
    <div id="selectsetlement">
        <div v-show="showList">
            <div class="grid-btn">
                <a class="btn btn-primary btn-sm" id="addselectsetlement">确定</a>
                <a class="btn btn-primary btn-sm" id="closeselectsetlement">关闭</a>
            </div>
            <table id="jqGridselectsetlement"></table>
            <div id="jqGridPagerselectsetlement"></div>
        </div>
    </div>
</div>
<!----------------------------选择结算单位窗口结束------------------------------------->
<!----------------------------选择工资开始------------------------------------->

<div id="windowsalary" hidden="true">
    <div id="selectsalary">
        <div v-show="showList">
            <div class="grid-btn">
                <a class="btn btn-primary btn-sm" id="addselectsalary">确定</a>
                <a class="btn btn-primary btn-sm" id="closeselectsalary">关闭</a>
            </div>
            <table id="jqGridselectsalary"></table>
            <div id="jqGridPagerselectsalary"></div>
        </div>
    </div>
</div>
<!----------------------------选择工资开始------------------------------------->
<!----------------------------选择社保开始------------------------------------->

<div id="windowsocialsb" hidden="true">
    <div id="selectsocialsb">
        <div v-show="showList">
            <div class="grid-btn">
                <a class="btn btn-primary btn-sm" id="addselectsocialsb">确定</a>
                <a class="btn btn-primary btn-sm" id="closeselectsocialsb">关闭</a>
            </div>
            <table id="jqGridselectsocialsb"></table>
            <div id="jqGridPagerselectsocialsb"></div>
        </div>
    </div>
</div>
<!----------------------------选择社保开始------------------------------------->
<!-- 弹出历史记录 -->
<div id="popHistory" style="display: none;padding:10px;">
    <table id="popHistoryGrid"></table>
    <div id="popHistoryGridPager"></div>
</div>
<script src="${rc.contextPath}/js/workflow/dfsp.js?_${date.systemTime}"></script>
</body>
</html>